﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace l1cs.server.serverpackets
{
    public class S_TrueTarget : ServerBasePacket
    {
        private static Logger _log = Logger.getLogger( typeof( S_TrueTarget ).FullName );

        private byte[] _byte = null;

        public S_TrueTarget( int targetId, int objectId, String message )
        {
            buildPacket( targetId, objectId, message );
        }

        private void buildPacket( int targetId, int objectId, String message )
        {
            writeC( Opcodes.S_OPCODE_TRUETARGET );
            writeD( targetId );
            writeD( objectId );
            writeS( message );
        }

        override
        public byte[] getContent()
        {
            if ( _byte == null )
            {
                _byte = getBytes();
            }
            return _byte;
        }

        override
        public String getType()
        {
            return "[S] S_TrueTarget";
        }
    }
}
